<template>
	<div class="family-wrap">
		<div class="bind-phone-outer-wrap" v-if="user.alter_bind_phone" v-show="bindPhoneShow">
			<bind-phone @closebind="bindPhoneShow = false"></bind-phone>
		</div>
	<!-- 	<family-template1 v-if="team_tempalte && loading" :eng_name="eng_name"></family-template1>
		<family-template0 v-else-if="!team_tempalte && loading" :title="title"></family-template0> -->
		<family-template0 :title="title" v-if="loading"></family-template0>
		<list-skeleton-loading v-if="!skeletonLoading"></list-skeleton-loading>
	</div>
</template>

<script>
	import {getHallInfo} from '@/api/hall'
	import {mapGetters} from 'vuex'
	import familyTemplate1 from '@/views/family_hall/template1'
	import familyTemplate0 from './template0'
	import bindPhone from '@/views/bind_phone/index'
	import ListSkeletonLoading from '@/components/SkeletonLoading/listLoading'
	import mixin from '@/mixins/removeLoading'
	export default{
		name:'familyHall',
		components: {
			bindPhone,
			familyTemplate0,
			familyTemplate1,
			ListSkeletonLoading
		},
		computed:{
			...mapGetters([
			  'user',
				'token'
			])
		},
		mixins: [mixin],
		provide(){
			return{
				skeletonLoad:this.skeletonLoad
			}
		},
		data(){
			return{
				team_tempalte:undefined,
				loading:false,
				title:'',
				bindPhoneShow:true,
				end_name:'',
				skeletonLoading:false,
				noAddComplete:true
			}
		},
		metaInfo(){
			return{
				title: `${this.title}`,
				meta: [{
				  name: 'keywords',
				  content: '1234tv.com、1234tv财经直播、财经直播平台、财经视频、财经直播系统、财经直播间、财经直播视频、财经直播教程'
				},{
					name: 'description',
					content: `在线分析大盘走势，分享最新资讯，交流投资技巧，尽在${this.title}！`
				}],
			}
		},
		created(){
			getHallInfo({eng_name:this.$route.params.eng_name,is_official:!window.is_official}).then(res=>{
				this.title = res.data.web_name
				this.team_tempalte = res.data.team_template
				this.eng_name = res.data.eng_name
				this.loading = true
			}).catch(err=>{
				this.loading = true
				console.log(err)
			})
		},
		methods:{
			skeletonLoad(){
				this.skeletonLoading = !this.skeletonLoading
			}
		}
	}
	
</script>

<style>
</style>
